import 'package:flutter/material.dart';
import 'package:online_study/theme/colors.dart';
import 'package:online_study/theme/size.dart';

//积分明细
class MyIntegralPage extends StatefulWidget {
  @override
  _MyIntegralPageState createState() => _MyIntegralPageState();
}

class _MyIntegralPageState extends State<MyIntegralPage> {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.symmetric(
          horizontal: ThemeSize.width9, vertical: ThemeSize.height6),
      padding: EdgeInsets.only(
          left: ThemeSize.width19,
          right: ThemeSize.width19,
          top: ThemeSize.width19,
          bottom: ThemeSize.height8),
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(ThemeSize.height8),
        color: ThemeColor.colorWhite,
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text("我的积分明细",
              style: TextStyle(
                color: ThemeColor.color333333,
                fontSize: ThemeSize.sp14,
              )),
          ListView.separated(
            itemBuilder: (BuildContext context, int index) {
              return Container(
                padding: EdgeInsets.symmetric(vertical: ThemeSize.height12),
                child: Row(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Expanded(
                        child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Text(
                          "每日答题",
                          style: TextStyle(
                              color: ThemeColor.color333333,
                              fontSize: ThemeSize.sp13,
                              fontWeight: FontWeight.bold),
                        ),
                        Container(
                          margin: EdgeInsets.only(top: ThemeSize.height8),
                          child: Text(
                            "2020-02-02 12:09",
                            style: TextStyle(
                                color: ThemeColor.color808080,
                                fontSize: ThemeSize.sp10),
                          ),
                        )
                      ],
                    )),
                    Text(
                      "+5",
                      style: TextStyle(
                          color: ThemeColor.colorFA5151,
                          fontSize: ThemeSize.sp13),
                      textAlign: TextAlign.center,
                    )
                  ],
                ),
              );
            },
            separatorBuilder: (BuildContext context, int index) {
              return Divider(height: ThemeSize.width1);
            },
            itemCount: 4,
            physics: NeverScrollableScrollPhysics(),
            shrinkWrap: true,
          )
        ],
      ),
    );
  }
}
